import request from "@/utils/request";

/**
 * @创建设备
 * @param {*} data
 * @returns
 */
export function create_device(data) {
  return request({
    url: `/ydyz/create_device.php`,
    method: "post",
    data: data,
  });
}

//创建摄像头接口
export function create_camera(data) {
  return request({
    url: `/ydyz/create_camera.php`,
    method: "post",
    data: data,
  });
}
//修改设备的接口
export function update_device(data) {
  return request({
    url: `/ydyz/update_device.php`,
    method: "post",
    data: data,
  });
}
//查询设备list
export function query_device(pageSize, page) {
  return request({
    url: `/ydyz/query_device.php?page=${page}&limit=${pageSize}`,
    method: "get",
  });
}

//删除设备
export function delete_device(id) {
  return request({
    url: `/ydyz/delete_device.php?device_id=${id}`,
    method: "DELETE",
  });
}

